﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Hyt.Core;
using Hyt.Core.Security;
using Hyt.Passport.Models;
using Hyt.Passport.Repositories;

namespace Hyt.Passport.Persist
{
    public class DepartmentRepository : PassportRepository<Department>, IDepartmentRepository
    {
        public IQueryable<Department> GetDepartments(QueryOption<Department> option = null)
        {
            return this.PersistService.GetQuery(option);
        }

        public Department AddDepartment(Department model)
        {
            return this.PersistService.Add(model);
        }

        public void RemoveDepartment(Department model)
        {
            this.PersistService.Remove(model);
        } 

        public void UpdateDepartment(Department model)
        {
            this.PersistService.Update(model);
        }

    }
}
